<template>
  <div
    :class="[
      systemKey == 1 ? 'home_bottom home_bottom_Item_more' : 'home_bottom',
    ]"
  >
    <div
      :class="[
        activeKey == 1
          ? 'home_bottom_item home_bottom_item_isActive'
          : 'home_bottom_item',
      ]"
      @click="toHome()"
    >
      <img
        v-if="activeKey == 1"
        class="home_bottom_item_img"
        src="../assets/image/home_footer_icon01.png"
        alt="首页"
      />
      <img
        v-if="activeKey != 1"
        class="home_bottom_item_img"
        src="../assets/image/home_footer_icon02.png"
        alt="首页"
      />
      <div class="home_bottom_item_name">首页</div>
    </div>
    <!-- <div
      v-if="systemKey == 1"
      :class="[
        activeKey == 2
          ? 'home_bottom_item home_bottom_item_isActive'
          : 'home_bottom_item',
      ]"
      @click="toGrade()"
    >
      <img
        v-if="activeKey == 2"
        class="home_bottom_item_img"
        src="../assets/image/home_footer_icon03.png"
        alt="培训列表"
      />
      <img
        v-if="activeKey != 2"
        class="home_bottom_item_img"
        src="../assets/image/home_footer_icon04.png"
        alt="培训列表"
      />
      <div class="home_bottom_item_name">培训列表</div>
    </div> -->
    <div
      :class="[
        activeKey == 3
          ? 'home_bottom_item home_bottom_item_isActive'
          : 'home_bottom_item',
      ]"
      @click="toAbout()"
    >
      <img
        v-if="activeKey == 3"
        class="home_bottom_item_img"
        src="../assets/image/home_footer_icon05.png"
        alt="关于篮协"
      />
      <img
        v-if="activeKey != 3"
        class="home_bottom_item_img"
        src="../assets/image/home_footer_icon06.png"
        alt="关于篮协"
      />
      <div class="home_bottom_item_name">关于篮协</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeFooter",
  props: {
    activeKey: Number,
    systemKey: Number, // 1. 教练员; 2. 裁判员
  },
  data() {
    return {};
  },
  created: function () {},
  methods: {
    // 跳转到首页
    toHome: function () {
      if (this.systemKey == 1) {
        this.$router.push({
          name: "CoachHome",
        });
      } else {
        this.$router.push({
          name: "RefereeHome",
        });
      }
    },
    // 跳转到培训列表
    toGrade: function () {
      this.$router.push({
        name: "CoachEnrollList",
      });
    },
    // 跳转到个人中心
    toUserCenter: function () {
      if (this.systemKey == 1) {
        this.$router.push({
          name: "CoachUserCenter",
        });
      } else {
        this.$router.push({
          name: "RefereeUserCenter",
        });
      }
    },
    // 关于篮协
    toAbout: function () {},
  },
};
</script>
